﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PortalWeb.Core.Entity;

namespace PortalWeb.Dao.Mapping
{
    public class RoleGroupMap : EntityTypeConfiguration<RoleGroup>
    {
        public RoleGroupMap()
        {
            // Relationships
            this.HasOptional(t => t.Parent)
                .WithMany(t => t.Children)
                .HasForeignKey(d => d.ParentId);

         
        }
    }
}
